<%@page import="com.cqan.account.entity.Authority.AuthType"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>锐信内容管理系统-修改商家信息</title>
<%@include file="/WEB-INF/pages/common/taglibs.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}resources/css/screen.css" />
<link rel="stylesheet" type="text/css" href="${ctx}resources/css/list.css" />
<script type="text/javascript" src="${ctx}resources/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="${ctx}resources/js/md5-min.js"></script>
</head>
<style>
.sing {
	width: 200px;
	height: 25px;
}
input {
	border:#999 1px solid;
}
</style>
<script type="text/javascript">
$().ready(function() {
	$("#signupForm").validate({
		rules: {
			name: {
				required: true,
				remote:{
					　　url:"${ctx}shop/checkShopName.htm", 
						dataType:"json",
						type:"post",
					　　data:{
						name:function(){
							 		return $("#name").val();
							 	},
							 	id:function(){
							 		return $("#id").val();
							 	}
						 	}
				　 }
			},
			tel: {
				required: true
			},
			area: {
				required: true
			},
			addr: {
				required: true
			},
			latitude: {
				required: true
			},
			longitude: {
				required: true
			}
		},
		messages: {
			name: {
				required: "*商家名称不能为空！",
				remote:"*该商家已经存在！"
			},
			tel: {
				required: "*商家联系方式不能为空！"
			},
			area: {
				required: "*区域不能为空！"
			},
			addr: {
				required: "*地址不能为空！"
			},
			latitude: {
				required: "*纬度不能为空！"
			},
			longitude: {
				required: "*经度不能为空！"
			}
		}
	});
});

</script>
</head><body>
<div align="center" style="padding-top:20px;">
  <form  id="signupForm" method="post" action="${ctx}shop/save.htm">
    <input type="hidden" value="${shop.id}" name="id" id="id">
    <input type="hidden" value="${pageNo}" name="pageNo">
    <table width="95%" cellpadding="0" cellspacing="1" align="center" id="bordertable">
      <tr class="tr0" height="40" >
        <td align="right" width="40%"><label>城市名称:</label></td>
        <td align="left" width="60%" ><input id="name" name="name" value="${shop.name}" class="sing"></td>
      </tr>
      <tr class="tr0" height="40">
        <td align="right" width="40%"><label>联系电话:</label></td>
        <td align="left" width="60%"><input name="tel" value="${shop.tel}" class="sing"></td>
      </tr>
      <tr class="tr0" height="40">
        <td align="right" width="40%"><label>区域:</label></td>
        <td align="left" width="60%"><input name="area" value="${shop.area}" class="sing"></td>
      </tr>
      <tr class="tr0" height="40">
        <td align="right" width="40%"><label>地址:</label></td>
        <td align="left" width="60%"><input name="addr" value="${shop.addr}" class="sing"></td>
      </tr>
      <tr class="tr0" height="40" >
        <td align="right" width="40%"><label>纬度:</label></td>
        <td align="left" width="60%"><input name="latitude" value="${shop.latitude}" class="sing"></td>
      </tr>
      <tr class="tr0" height="40">
        <td align="right" width="40%"><label>经度:</label></td>
        <td align="left" width="60%"><input name="longitude" value="${shop.longitude}" class="sing"></td>
      </tr>
      <tr class="tr0" height="40">
        <td align="right" width="40%"><label>交通路线:</label></td>
        <td align="left" width="60%"><textarea name="trafficInfo" class="sing">${shop.trafficInfo}</textarea> </td>
      </tr>
     <tr height="60px;"  class="tr0">
			<td style="padding-right: 20px;text-align: right;"><input class="button" type="submit" value="提交"/></td>
			<td  style="padding-left: 20px;text-align: left;"><input class="button"  type="reset" value="取消" onclick="javascript:history.back();"/></td>
		</tr>
    </table>
  </form>
</div>
</body>
</html>